package com.example.demo.mapper;

import com.example.demo.entity.Todolist;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface TodolistMapper {

    // 假设在 Todolist 表中有一个 user_id 列，用于标识任务属于哪个用户
    @Select("SELECT * FROM todolist WHERE user_id = #{userId}")
    List<Todolist> selectByUserId(@Param("userId") Integer userId);
}